import {errorMapper} from './modules/errorMapper'
import mount from "./modules/mount/mout.js";
import {creepNumController} from "./modules/controller/creepNumController.js";
import {creepActionController} from "./modules/controller/creepActionController.js";
import {structureActionController} from "./modules/controller/structureActionController.js";
import {warController} from "./modules/controller/warController.js";
import {orderController} from "./modules/controller/orderController.js";
import {cacheController} from "./modules/controller/cacheController.js";
import {flagController} from "./modules/controller/FlagController.js";
//原型扩展
mount()
export const loop = errorMapper(() => {
    for (const roomKey in Memory.Rooms) {
        //缓存控制器
        cacheController(roomKey)
        //creep数量控制器
        creepNumController(roomKey)
        //creep行为控制器
        creepActionController(roomKey)
        //建筑行为控制器
        structureActionController(roomKey)
        //预布局控制器
        // flagController(roomKey)
        //战争控制器
        warController(roomKey)
        //交易控制器
        orderController()
    }
})